Image encoding method and image decoding method

ABSTRACT

An image encoding method for encoding an image, includes: a prediction image generation step of generating a synthesis-prediction image by performing synthesis processing of synthesizing an inter-prediction image and an intra-prediction image to an encoding-target block; and an encoding step of encoding a difference between the prediction image generated in the prediction image generation step and a pixel value of an image of the encoding-target block, a plurality of types of intra predictions are allowed to be used as the intra prediction used for the synthesis processing, and the plurality of types of intra predictions include an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the inter-prediction image and the intra-prediction image, and a weighting parameter in the weighting processing is determined in accordance with a type of the intra prediction.

TECHNICAL FIELD

The present invention relates to an image encoding technique for encoding an image or an image decoding technique for decoding an image.

BACKGROUND ART

As methods of digitizing image and audio information to be data, and recording and transmitting them, H. 264/AVC (Advanced Video Coding), H. 265/HEVC (High Efficiency Video Coding) standards, and the like have been formulated so far. ISO/IEC MPEG and ITU-T VCEG have studied a next-generation method called VVC (versatile video coding) that further achieves compression rates exceeding these methods (see Non-Patent Document 1).

RELATED ART DOCUMENT Non-Patent Document

-   Non-Patent Document 1: Xiaozhong Xu and Shan Liu, “Recent advances     in video coding beyond the HEVC standard” SIP (2019), vol. 8

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

As one of VVC technique candidates, use of a prediction image obtained by synthesizing an inter prediction image and an intra prediction image of the same encoding/decoding-target block has been studied.

However, it is not sufficient to reduce the code amount only by using a prediction image obtained by simply averaging and synthesizing the inter prediction image and the intra prediction image.

The present invention has been made in view of the above problems, and an aim of the present invention is to provide a more suitable image encoding technique and image decoding technique.

Means for Solving the Problems

In order to achieve the above-described aim, an embodiment of the present invention may be configured to include, for example: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to an encoding-target block; and an encoding step of encoding a difference between the prediction image generated in the prediction image generation step and a pixel value of an image of the encoding-target block, a plurality of types of intra predictions are allowed to be used as the intra prediction used for the synthesis processing, and the plurality of types of intra predictions include an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and a weighting parameter in the weighting processing is determined in accordance with the type of the intra prediction.

Effects of the Invention

According to the present invention, a more suitable image encoding technique and image decoding technique can be provided.

BRIEF DESCRIPTIONS OF THE DRAWINGS

FIG. 1 is an explanatory diagram of an example of an image encoding apparatus according to a first embodiment of the present invention;

FIG. 2 is an explanatory diagram of an example of an image decoding apparatus according to a second embodiment of the present invention;

FIG. 3 is an explanatory diagram of an example of an image encoding method according to the first embodiment of the present invention;

FIG. 4 is an explanatory diagram of an example of an image decoding method according to the second embodiment of the present invention;

FIG. 5 is an explanatory diagram of an example of a data recording medium according to a third embodiment of the present invention;

FIG. 6 is an explanatory diagram of an example of types of intra prediction according to an embodiment of the present invention;

FIG. 7 is an explanatory diagram of an example of a planar prediction according to an embodiment of the present invention;

FIG. 8 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 9 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 10 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 11 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 12 is an explanatory diagram of an example of a matrix weighting intra prediction according to an embodiment of the present invention;

FIG. 13 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 14 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 15 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention;

FIG. 16 is an explanatory diagram of an example of an in-screen block copy prediction according to an embodiment of the present invention; and

FIG. 17 is an explanatory diagram of an example of a synthesis prediction processing according to an embodiment of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Hereinafter, embodiments of the present invention will be described with reference to the drawings.

In each drawing, components denoted by the same reference symbol have the same functions.

An expression “0vec” or “0 vector” in each description and each drawing of the present specification indicates a vector in which a value of each component is 0, or transformation or setting into such a vector.

In addition, an expression “not referable” in each description and each drawing of the present specification indicates that information of a block cannot be acquired because a block position is out of a range of a screen or others. An expression “referable” means that information of a block can be acquired, and the information of the block includes information such as a pixel value, a vector, a reference frame number, and/or a prediction mode.

In addition, an expression “residual component” in each description and each drawing of the present specification includes the same meaning as “prediction error”.

In addition, an expression “domain” in each description and each drawing of the present specification includes the same meaning as “image”.

In addition, an expression “transmission together with a flag” in each description and each drawing of the present specification also includes the meaning of “transmission to be included in the flag”.

First Embodiment

First, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 illustrates an example of a block diagram of an image encoding apparatus according to the first embodiment of the present invention.

The image encoding apparatus includes, for example, an image input interface 101, a block divider 102, a mode controller 103, an intra predictor 104, an inter predictor 105, a synthesis predictor 120, a block processor 106, a converter/quantizer 107, an inverse quantizer/inverse converter 108, an image synthesizer/filter 109, a decoded image controller 110, an entropy encoder 111, and a data output interface 112.

Hereinafter, the operation of each component of the image encoding apparatus will be described in detail.

Note that the operation of each component of the image encoding apparatus may be, for example, an autonomous operation of each component as described below. In addition, for example, the operation may be achieved by cooperating with a controller or software stored in a storage unit.

First, the image input interface 101 acquires and inputs an encoding-target original image. Next, the block divider 102 divides the input original image into blocks of a constant size called coding tree units (CTUs), and further analyzes the input image to divide each CTU into more detailed blocks in accordance with the features thereof. Such a block serving as a unit of the encoding is called coding unit (CU). The division of a CTU into CUs is managed by a tree structure such as a quadtree, a ternary tree, or a binary tree. The inside of the CU may be further divided into a sub-block for prediction or into a TU (transform unit) for frequency transform, quantization, or the like.

The mode controller 103 manages a mode for determining an encoding method of each CU. Encoding processing is performed using a plurality of intra prediction methods, inter prediction methods, and synthesis prediction methods, and a mode that is most efficient for encoding the CU is determined. The most efficient mode is a mode in which the encoding error can be minimized with respect to a constant code amount. There may be a plurality of optimum modes, and the optimum modes may be appropriately selected in accordance with the situation. The determination as to which mode is efficient is performed by combining prediction processing of a plurality of modes by the intra predictor 104, the inter predictor 105, or the synthesis predictor 120, code amount measurement of a residual component and various flags using another processer, and a reproduction image error prediction at the time of decoding. Generally, the mode is determined on a CU basis. However, the CU may be divided into sub-blocks, and the mode may be determined for each of the sub-blocks.

Methods for predicting the encoding-target block (the CU or the sub-block) include an intra (intra-frame) prediction, an inter (inter-frame) prediction, and a synthesis prediction combining the intra prediction and the inter prediction, and these are performed by the intra predictor 104, the inter predictor 105, and the synthesis predictor 120, respectively. The intra prediction uses information of the same frame that is encoded before the encoding-target block, and the inter prediction uses information of a frame that is encoded before the encoding-target frame and that is previous or post in the reproduction time. Here, only one of the intra predictor 104, the inter predictor 105, and the synthesis predictor 120 has been described for the sake of description, but those may be provided for each encoding mode or each frame.

The intra predictor 104 performs in-screen prediction processing. In the “prediction processing”, a prediction image is generated. The in-screen prediction processing predicts a pixel of the encoding-target block by using the information of the same frame encoded before the encoding-target block. The intra prediction includes a DC prediction, an angular prediction, a planar prediction, a matrix prediction, a cross-component prediction, a multi-line prediction, in-screen block copy, and the like. In the transmission of the intra prediction mode, the highest potential mode is estimated from the intra prediction mode of the encoded block.

The inter predictor 105 performs inter-screen prediction processing. In the “prediction processing”, a prediction image is generated. In the inter-screen prediction processing, a pixel of the encoding-target block is predicted by using the information of the frame that is encoded before the encoding-target frame and that is the previous or the post frame in the reproduction time. The inter prediction includes a motion compensation prediction, a merge mode prediction, a prediction by affine transformation, a prediction by triangle block division, an optical flow prediction, a prediction by a decoder side motion prediction, and the like.

The synthesis predictor 120 performs a synthesis prediction for generating a synthesis prediction image obtained by synthesizing the prediction image based on the intra prediction and the prediction image based on the inter prediction. As the prediction image based on the intra prediction used by the synthesis predictor 120, prediction images of various types of in-screen prediction processing that can be performed by the intra predictor 104 may be used. As the prediction image based on the inter prediction used by the synthesis predictor 120, prediction images of various types of in-screen prediction processing that can be performed by the inter predictor 105 may be used. Details of the synthesizing method will be described later.

For each encoding-target block, the block processor 106 calculates and outputs a residual component by taking a difference between the original image of the encoding-target block obtained from the block divider 102 and the prediction image based on the intra prediction performed by the intra predictor 104, the prediction image based on the inter prediction performed by the inter predictor 105, or the prediction image based on the synthesis prediction performed by the synthesis predictor 120.

The converter/quantizer 107 performs frequency transform and quantization processing on the residual component that is input from the block processor 106, and outputs a coefficient string. For the frequency transform, a discrete cosine transform (DCT), a discrete sine transform (DST), a product obtained by transforming them to be processable by integer operation, or the like may be used. The coefficient string is transmitted both to a process of reconstructing the image to create a decoded image used for prediction and to a process of outputting data. The transform and quantization may be skipped by designation of the mode.

The inverse quantizer/inverse converter 108 performs inverse quantization and inverse transform on the coefficient string acquired from the converter/quantizer 107 in order to create the decoded image used for prediction, and outputs the restored residual component. The inverse quantization and the inverse transform may be performed in inverse directions of the corresponding quantization and transform of the converter/quantizer, respectively. The inverse quantization and the inverse transform may be skipped by designation of the mode.

The image synthesizer/filter 109 synthesizes the prediction image generated by the intra predictor 104, the prediction image generated by the inter predictor 105, or the prediction image generated by the synthesis predictor 120 with the residual component restored by the inverse quantizer/inverse converter 108, and further performs processing such as a loop filter to generate the decoded image.

The decoded image controller 110 holds the decoded image, and manages an image referred to for the intra prediction, the inter prediction, or the synthesis prediction, mode information, and the like.

The entropy encoder 111 performs entropy encoding processing on the mode information and the coefficient string information, and outputs the processed information as a bit string. As an entropy encoding method, a method such as context adaptive binary arithmetic code (CABAC) may be used. The variable-length code and the fixed-length code may be used in combination. For determination of the context, a predetermined table may be referred to.

The data output interface 112 outputs the encoded data to a recording medium or a transmission path.

Next, a flow of the encoding method in the image encoding apparatus according to the first embodiment of the present invention will be described with reference to FIG. 3 .

First, in step 301, the encoding-target original image is input, contents of the image are analyzed to determine the division method, and the image is divided into the blocks. The analysis of the image contents may be performed on the entire image, on combination of a plurality of frames, or in a unit of a block such as a slice, a tile, a brick, and a CTU obtained by dividing the image. In the general block division, the block is divided into the CTUs of a constant size, and then, is divided into the CUs based on the tree structure.

Next, in step 302, the intra prediction is performed on the encoding-target block of the original image acquired in step 301. The intra prediction mode is as described above. The prediction is performed for a plurality of modes in accordance with each intra prediction mode.

Next, in step 303, the inter prediction is performed on the encoding-target block of the original image acquired in step 301. The inter prediction mode is as described above. The prediction is performed for a plurality of modes in accordance with each inter prediction mode.

Next, in step 320, the synthesis prediction is performed on the encoding-target block of the original image acquired in step 301. Details of the synthesis prediction mode will be described later.

Next, in step 304, for each mode, the residual component in the pixel of the encoding-target block that has been subjected to the intra prediction, the inter prediction, and the synthesis prediction is separated, and the transform processing, the quantization processing, and the entropy encoding processing are performed on the residual component to calculate the encoded data.

Next, in step 305, inverse quantization and inverse transform processing are performed for each mode, and the residual component is synthesized with the prediction image to create the decoded image. The decoded image is managed together with the prediction data and various types of the encoded data in the intra prediction and the inter prediction, and is used for prediction of other encoding-target blocks.

Next, in step 306, the modes are compared to determine which mode can be encoded most efficiently. The modes include the intra prediction mode, the inter prediction mode, the synthesis prediction mode, and the like, which are collectively referred to as an encoding mode. The mode selection method is as described above.

In step 307, the encoded data of the encoding-target block is output in accordance with the determined encoding mode. The above-described encoding process of each encoding-target block is repeatedly performed on the entire image, and image encoding is performed.

Next, the synthesis prediction mode according to the present embodiment will be described. As the prediction image generation processing based on the synthesis prediction mode performs, note that the same processing is performed on the encoding side and the decoding side. Therefore, in the following description regarding the synthesis prediction mode according to the present embodiment, the same processing is performed on the encoding side and the decoding side unless otherwise specified.

The synthesis prediction mode according to the present embodiment generates the prediction image based on the synthesis prediction by weighting and averaging the intra prediction image based on the intra prediction and the inter prediction image based on the inter prediction. Specifically, as an inter prediction pixel “Pinter” and an intra prediction pixel “Pintra”, each prediction pixel “Pcom” (hereinafter, it is referred to as a prediction synthesis pixel) of the prediction image is calculated by the following Expression 1.

Pcom=(w*Pintra+(4−w)*Pinter)/4  Expression 1

That is, the processing of Expression 1 is weighting averaging processing of the inter prediction pixel and the intra prediction pixel using “w” that is a weighting parameter. Note that this processing may be expressed as weighting addition.

As the inter prediction image used in the synthesis prediction mode according to the present embodiment, all prediction images based on the inter prediction that can be used in the above-described inter prediction mode may be used as candidates. Among the inter prediction modes described above, only the prediction image in the merge mode may be targeted.

As the intra prediction image used in the synthesis prediction mode according to the present embodiment, all prediction images based on the intra prediction that can be used in the above-described intra prediction mode may be used as candidates. Furthermore, among the intra prediction modes described above, only the prediction images based on the angular prediction, the DC prediction, and the planar prediction may be targeted.

Here, in the synthesis prediction mode according to the present embodiment, the weighting parameter w used for the calculation of the synthesis prediction pixel is determined in accordance with the type of the intra prediction for generating the intra prediction image used in the synthesis prediction mode. That is, a more suitable prediction image is generated by changing the weight of the intra prediction image in the weighting average of the intra prediction image and the inter prediction image in accordance with the features of the different intra predictions.

Hereinafter, a specific example of the determination processing of the weighting parameter w in the synthesis prediction mode according to the present embodiment will be described.

First, the angular prediction, the DC prediction, and the planar prediction, which are the intra predictions included in the candidates used for generating the intra prediction image used in the synthesis prediction mode according to the present embodiment, will be described with reference to FIGS. 6 and 7 .

FIG. 6 illustrates a prediction direction of the angular prediction. The angular prediction is a prediction method for predicting each prediction-targeting pixel with reference to an adjacent pixel indicated by each prediction direction illustrated in the drawing. The prediction is a one-way prediction, and can also be regarded as prediction of copying an adjacent pixel value in an opposite direction of each prediction direction. The prediction directions each can be identified by a number, and are set as, for example, the illustrated prediction directions 2 to 66. The drawing shows representative prediction directions that are 2 (lower left direction), 18 (left horizontal direction (horizontal direction)), 34 (upper left direction), 50 (upper direction (vertical direction)), and 66 (upper right direction). In this drawing, for the sake of simplicity of explanation, notation of other prediction directions is omitted, but the prediction direction is defined in the clockwise rotation direction every time the prediction direction number increases from the prediction direction 2 to the prediction direction 66. The angular prediction is a one-way prediction based on the adjacent pixel value.

Therefore, the prediction residual tends to be reduced with respect to an image such as a stripe pattern in which a picture pattern extends in a predetermined direction. Reducing the prediction residual means increasing the compression rate. Selecting the angular prediction on the encoding side is made when an image having a small prediction residual in the angular prediction is encoded, and this image is highly possibility the image in which the picture pattern extends in the predetermined direction. Then, selecting the angular prediction for the encoding-target block on the encoding side is highly possibility made when the angular prediction using the same prediction direction as that of the encoding-target block or a prediction direction close to the prediction direction of the encoding-target block is also adopted for the adjacent block. This is because there is a high possibility that the prediction residual becomes small in the angular prediction in the same prediction direction as that of the encoding-target block or the prediction direction close to the prediction direction of the encoding-target block as long as the picture pattern continues to extend in the image in which the picture pattern extends in the predetermined direction. This can also be expressed as having a high possibility of high prediction accuracy.

In this case, there is a high possibility that the angular prediction in the same prediction direction between a plurality of adjacent blocks or the angular prediction in a prediction direction close to this direction is repeatedly selected. That is, it can be said that the angular prediction is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method. The “prediction direction close to the prediction direction of the encoding-target block” may be specifically defined as a prediction direction in which the number of the prediction direction is ±1 of the number of the prediction direction of the encoding-target block. Alternatively, specifically, the prediction direction may be defined as a prediction direction in which the number of the prediction direction is ±2 of the number of the prediction direction of the encoding-target block.

Further, in FIG. 6 , the DC prediction number is indicated as 1. The DC prediction is a prediction method for generating a prediction image corresponding to only a DC component in a frequency domain. That is, all the pixel values in the prediction image of the DC prediction are constant values. The DC prediction is a prediction method not based on the adjacent pixel value. However, the image having the tendency capable of reducing the prediction residual in the DC prediction is a planar picture pattern in which constant luminance continues widely or the like. Then, when the DC prediction is selected for the encoding-target block on the encoding side, there is a high possibility that the same DC prediction as that of the encoding-target block is adopted also for the adjacent block. This is because there is a high possibility that the prediction residual becomes small in the same DC prediction as long as the planar picture pattern having the constant luminance is connected in the peripheral direction.

This can also be expressed as having a high possibility of high prediction accuracy. In this case, there is a high possibility that the same DC prediction between a plurality of adjacent blocks is repeatedly selected. That is, although the DC prediction is a prediction method not based on the adjacent pixel value, it can be said that the DC prediction is an intra prediction having relatively high approximation of the adjacent block regarding the prediction method.

Further, in FIG. 6 , the planar prediction number is indicated as 0. A specific prediction method of the planar prediction is illustrated in FIG. 7 . In the planar prediction, an upper right adjacent pixel of the encoding-target block is used (processing 710) to generate a reference pixel at a right boundary of the encoding-target block (processing 711). Next, each prediction pixel is generated by linear interpolation using this right reference pixel and a left adjacent pixel facing the right reference pixel to generate a first prediction image (FIG. 7(A)) (processing 712).

Furthermore, a lower left adjacent pixel of the encoding-target block is used (processing 720) to generate a reference pixel at a lower boundary of the encoding-target block (processing 721). Next, each prediction pixel is generated by linear interpolation using this lower reference pixel and an upper adjacent pixel facing the lower reference pixel to generate a second prediction image (FIG. 7(B)) (processing 722). Then, the first prediction image (FIG. 7(A)) and the second prediction image (FIG. 7(B)) generated in this manner are averaged to generate a final prediction image. The planar prediction is an intra prediction having a feature in which a prediction image of a nonlinear curved surface is generated by averaging the first prediction image (FIG. 7(A)) and the second prediction image (FIG. 7(B)) generated by the linear interpolation.

The planar prediction is a prediction based on the adjacent pixel value. However, since the prediction image generated by the planar prediction is made of the featured nonlinear curved surface, the approximation of the adjacent block regarding the prediction method is not high at all. As described above, when the prediction residual becomes small in the angular prediction or the DC prediction, there is a high possibility that the same prediction method as that of the adjacent block is repeated. On the other hand, there are not many images having the picture pattern in which the featured nonlinear curved surface of the prediction image of the planar prediction needs to be repeated.

Therefore, it can be said that the planar prediction is an intra prediction having relatively low approximation of the adjacent block regarding the prediction method. In addition, selecting the planar prediction for the encoding-target block on the encoding side is highly possibility made in a case of an image having not a sufficiently small prediction residual in the angular prediction or the DC prediction. Since the image having not the sufficiently small prediction residual in the angular prediction or the DC prediction has a high possibility of not being a simple picture pattern, the prediction residual based on the planar prediction for the image having not the small prediction residual in the angular prediction or the DC prediction is highly possibly larger than the prediction residual in a case of having the small prediction residual in the angular prediction or the DC prediction. This can also be expressed as having a high possibility of low prediction accuracy.

As described with reference to FIGS. 6 and 7 , the angular prediction, the DC prediction, and the planar prediction that can be used in the synthesis prediction mode according to the present embodiment are the intra predictions having different features from one another. Therefore, in the synthesis prediction mode according to the present embodiment, control is performed to determine the value of the weighting parameter w of Expression 1 in accordance with the type of the intra prediction while focusing on such a feature for each type of the intra prediction. The w determination processing in the synthesis prediction mode according to the present embodiment will be described with reference to FIG. 8 .

FIG. 8 illustrates w-determination examples in the synthesis prediction mode according to the present embodiment. FIG. 8 illustrates three examples of w-determination example 1, w-determination example 2, and w-determination example 3. These are different determination method examples. In each determination method, the “w” value is determined from any one of 1, 2, and 3 for each condition. In Expression 1, the larger the w value is, the larger the weighting of the intra prediction in the synthesis prediction mode is. Conversely, in Expression 1, the smaller the w value is, the smaller the weighting of the intra prediction in the synthesis prediction mode is. Hereinafter, these determination examples will be described.

In the w-determination example 1, when the intra prediction used in the synthesis prediction mode is the planar prediction, “w=1” is determined. When the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is the horizontal direction (18) or the vertical direction (50), “w=3” is determined. When the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is 2 to 17 or 51 to 66, “w=3” is determined. When the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is 19 to 49, “w=3” is determined. When the intra prediction used in the synthesis prediction mode is the DC prediction, “w=3” is determined.

That is, in the w-determination example 1, the planar prediction which is the intra prediction having relatively low approximation of the adjacent block regarding the prediction method is a determination method that can take a smaller w value than those of the angular prediction and the DC prediction. The prediction image of the planar prediction is made of the featured nonlinear curved surface, and the prediction accuracy is highly possibly low, and therefore, it can be also expressed that it is preferable to take the smallest weighting in the synthesis prediction mode.

On the other hand, in the w-determination example 1, in the angular prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method, 3 which is the larger w value than the w value of the planar prediction is selected in any prediction direction. The angular prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method is a determination method that can take a larger w value than that of the planar prediction. The prediction image of the angular prediction is made of a simple one-way prediction surface, and the prediction accuracy is highly possibly high, and therefore, it can be also expressed that it is preferable to take relatively large weighting in the synthesis prediction mode.

In addition, in the w-determination example 1, in the DC prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method, 3 which is the larger w value than the w value of the planar prediction is selected. The DC prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method is a determination method that can take a larger w value than that of the planar prediction. The prediction image of the DC prediction is made of a simple plane having a constant value, and the prediction accuracy is highly possibly high, and therefore, it can be also expressed that it is preferable to take relatively large weighting in the synthesis prediction mode.

As described above, in the w-determination example 1, the w value is determined in accordance with the type of the intra prediction. In this case, the planar prediction is set to be able to have the smallest value. In the angular prediction, the w value is set to be constant in any prediction direction. That is, in the w-determination example 1, the w value does not change in accordance with the prediction direction of the angular prediction.

Next, in the w-determination example 2, when the intra prediction used in the synthesis prediction mode is the planar prediction, “w=1” is determined. When the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is the horizontal direction (18) or the vertical direction (50), “w=2” is determined. When the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is 2 to 17 or 51 to 66, “w=3” is determined. When the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is 19 to 49, “w=3” is determined. When the intra prediction used in the synthesis prediction mode is the DC prediction, “w=3” is determined.

That is, in the w-determination example 2, as similar to the w-determination example 1, the planar prediction which is the intra prediction having relatively low approximation of the adjacent block regarding the prediction method is a determination method that can take a smaller w value than those of the angular prediction and the DC prediction. The reason is the same as in the w-determination example 1. In the w-determination example 2, in the angular prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method, 2 or 3 which is the larger w value than the w value of the planar prediction is selected in any prediction direction. The angular prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method is a determination method that can take a larger w value than that of the planar prediction.

The prediction image of the angular prediction is made of a simple one-way prediction surface, and the prediction accuracy is highly possibly high, and therefore, it can be also expressed that it is preferable to take relatively large weighting in the synthesis prediction mode. However, as different from the w-determination example 1, the w-determination example 2 changes the w value in accordance with the prediction direction even in the same angular prediction.

Specifically, when the prediction direction is the horizontal direction (18) or the vertical direction (50), “w=2” is set, and the weighting is set to be lower than “w=3” in other prediction directions in the angular prediction. This is because it is conceivable that the prediction direction as the horizontal direction (18) is only in the case of the pixel of the left adjacent block as the reference pixel, and the approximation of the adjacent block regarding the prediction method is highly possibly limited to the left adjacent block, and therefore, the overall approximation of the adjacent block regarding the prediction method is lower than those in other prediction directions.

Furthermore, similarly, this is because it is conceivable that the prediction direction as the vertical direction (50) is only in the case of the pixel of the upper adjacent block as the reference pixel, and the approximation of the adjacent block regarding the prediction method is highly possibly limited to the upper adjacent block, and therefore, the overall approximation of the adjacent block regarding the prediction method is lower than those in other prediction directions. Further, in the w-determination example 2, as similar to the w-determination example 1, in the DC prediction which is the intra prediction having relatively high approximation of the adjacent block regarding the prediction method, 3 which is the larger w value than the w value of the planar prediction is selected. The reason is the same as in the w-determination example 1.

As described above, in the w-determination example 2, the w value is determined in accordance with the type of the intra prediction. Furthermore, in a case where the intra prediction is the angular prediction, the w value is determined in consideration of the prediction direction. In addition, the w value is set so that the planar prediction can be the smallest value.

The w-determination example 3 is different from the w-determination example 2 in that “w=2” is determined when the intra prediction used in the synthesis prediction mode is the angular prediction while the prediction direction is 2 to 17 or 51 to 66, but is in common with the same in other points. In the case of the prediction direction 2 to 17 or 51 to 66 in the angular prediction, an angle of the prediction direction is neither completely the horizontal direction nor the vertical direction, and therefore, the approximation regarding the prediction method is recognized for both the upper adjacent block and the left adjacent block.

However, the pixel included in the reference pixel is either the pixel of the upper adjacent block or the pixel of the left adjacent block. The case of the prediction direction 2 to 17 or 51 to 66 has a possibility of the lower overall approximation of the adjacent block regarding the prediction method than that of the case of the prediction direction 19 to 49 in which both the pixel of the upper adjacent block and the pixel of the left adjacent block are included in the reference pixel. Therefore, in the w-determination example 3, “w=2” is determined in the case of the prediction direction 2 to 17 or 51 to 66 so that the weighting is made smaller than that in the case of the prediction direction 19 to 49.

According to the above-described w-determination examples in the synthesis prediction mode of FIG. 8 , it is possible to more suitably determine the weighting of the intra prediction image in the synthesis of the intra prediction image and the inter prediction image in accordance with the feature of each type of the intra prediction used in the synthesis prediction mode.

As described above, the coding processing according to an embodiment of the present application is performed.

According to the above-described image encoding apparatus and the above-described image encoding method according to the first embodiment, a more suitable synthesis prediction mode can be achieved.

Furthermore, the image encoding apparatus and the image encoding method according to the first embodiment are applicable to a recording device, a mobile phone, a digital camera, or the like using them.

According to the above-described image encoding apparatus and the above-described image encoding method according to the first embodiment of the present invention, it is possible to reduce the code amount of the encoded data to prevent deterioration of the image quality of the decoded image in the decoding of the encoded data. That is, a high compression rate and a better image quality can be achieved.

That is, according to the image encoding apparatus and the image encoding method according to the first embodiment of the present invention, a more suitable image encoding technique can be provided.

Second Embodiment

Next, FIG. 2 illustrates an example of a block diagram of an image decoding apparatus according to a second embodiment of the present invention.

The image decoding apparatus includes, for example, a stream analyzer 201, a block controller 202, a mode determiner 203, an intra predictor 204, an inter predictor 205, a synthesis predictor 220, a coefficient analyzer 206, an inverse quantizer/inverse converter 207, an image synthesizer/filter 208, a decoded image controller 209, and an image output interface 210.

Hereinafter, the operation of each component of the image decoding apparatus will be described in detail.

Note that the operation of each component of the image decoding apparatus may be, for example, an autonomous operation of each component as described below. In addition, the operation of each component may be achieved by, for example, cooperating with a controller or software stored in a storage unit.

First, the stream analyzer 201 analyzes the input encoded stream. Here, the stream analyzer 201 also performs data extraction processing from a packet and information acquisition processing of various headers and flags.

Furthermore, in this case, the encoded stream input to the stream analyzer 201 is, for example, an encoded stream generated by the image encoding apparatus and the image encoding method according to the first embodiment. Since the generation method is as described in the first embodiment, the description thereof will be omitted. The encoded stream may be an encoded stream read from a data recording medium illustrated in a third embodiment. A recording method will be described later.

Next, the block controller 202 manages block processing in accordance with the information of block division analyzed by the stream analyzer 201. Generally, the encoded image is divided into the blocks, and each encoding-target block is managed by the tree structure or the like. The processing order of the blocks is often performed in the order of raster scanning, but the blocks may be processed in an optionally-determined order such as zigzag scanning. The block division method is as described in the first embodiment.

Next, for each encoding-target block, the mode determiner 203 determines the encoding mode designated by the flag or the like. In the following decoding processing, processing corresponding to the encoding mode as the determined result is performed. Hereinafter, processing for each encoding mode will be described.

First, when the encoding mode is the intra encoding, the intra predictor 204 generates the prediction image based on the intra prediction. The intra prediction mode is as described in the first embodiment. In principle, the processing of generating the prediction image based on the prediction is the same between the encoding side and the decoding side.

When the encoding mode is the encoding based on the inter prediction, the inter predictor 205 generates the prediction image based on the inter prediction. The inter prediction mode is as described in the first embodiment. In principle, the processing of generating the prediction image based on the prediction is the same between the encoding side and the decoding side.

When the encoding mode is the encoding based on the synthesis prediction, the synthesis predictor 220 generates the prediction image based on the synthesis prediction. The synthesis prediction mode is as described in the first embodiment. In principle, the processing of generating the prediction image based on the prediction is the same between the encoding side and the decoding side.

On the other hand, the coefficient analyzer 206 analyzes the encoded data of each encoding-target block included in the input encoded stream, decodes the entropy-coded data, and outputs the encoded data including the coefficient string of the residual component. In this case, processing corresponding to the encoding mode as the identification result of the mode determiner 203 is performed.

The inverse quantizer/inverse converter 207 performs inverse quantization processing and inverse transform on the encoded data including the coefficient string of the residual component to restore the residual component. The method of inverse quantization and inverse transform is as described above. The inverse quantization and the inverse transform may be skipped by designation of the mode.

The residual component restored as described above is synthesized with the prediction image output from the intra predictor 204, the inter predictor 205, or the synthesis predictor 220 by the image synthesizer/filter 208, and is further subjected to processing such as a loop filter, and the result is output as the decoded image.

The decoded image controller 209 holds the decoded image, and manages an image referred to for the intra prediction, the inter prediction, or the synthesis prediction, mode information, and the like.

The last decoded image is output by the image output interface 210, and the image is decoded.

Next, a flow of an image decoding method in the image decoding apparatus according to the second embodiment of the present invention will be described with reference to FIG. 4 .

First, in step 401, an encoded stream to be a decoding target is acquired, and data is analyzed. In addition, block processing is managed in accordance with the analyzed block division information. The block division method is as described in the first embodiment.

Next, in step 402, the encoding mode of one encoding unit (block unit, pixel unit, or the like) included in the encoded data is determined with reference to the information of the encoding mode analyzed in step 401. Here, the process proceeds to step 403 in the case of the intra encoding mode, the process proceeds to step 404 in the case of the inter encoding mode, and the process proceeds to step 420 in the case of the synthesized encoding mode.

In step 403, the prediction image based on the intra prediction is generated in accordance with the method designated by the encoding mode. The intra prediction mode is as described in the first embodiment.

In step 404, the prediction image based on the inter prediction is generated in accordance with the method designated by the encoding mode. The inter prediction mode is as described in the first embodiment.

In step 420, the prediction image based on the synthesis prediction is generated in accordance with the method designated by the encoding mode. The synthesis prediction mode is as described in the first embodiment.

In step 405, the encoded data of each encoding-target block is analyzed in accordance with the method designated by the encoding mode, the entropy-encoded data is decoded, and the encoded data including the coefficient string of the residual component is output. Further, the inverse quantization processing and inverse transform are performed to the encoded data including the coefficient string of the residual component to restore the residual component. The method of the inverse quantization and the inverse transform is as described above. The inverse quantization and the inverse transform may be skipped by designation of the mode.

In step 406, for each encoding-target block, the restored residual component and the prediction image generated by the intra prediction, the inter prediction, the synthesis prediction, or the like are synthesized, and processing such as a loop filter is further performed to generate the decoded image. The decoded image is generated by performing the decoding process performed in a unit of the encoding-target block to the entire image.

In step 407, the generated decoded image is output and displayed.

The processing of the synthesis prediction mode on the decoding side according to the present embodiment is substantially the same as the processing of the synthesis prediction mode described with reference to Expression 1 and FIGS. 6, 7, and 8 in the first embodiment, and therefore, repeated description will be omitted. The expression “encoding-target block” in the description of the synthesis prediction mode of the first embodiment may be interpreted as “decoding-target block” in the processing of the synthesis prediction mode on the decoding side.

In the synthesis prediction mode on the decoding side according to the present embodiment, as described above, the weighting averaging processing is performed to the inter prediction pixel and the intra prediction pixel with reference to Expression 1. Furthermore, in the synthesis prediction mode on the decoding side according to the present embodiment, as described above, the weighting parameter “w” is determined by determination processing as illustrated in FIG. 8 . As a result, in accordance with the feature of each type of the intra prediction used in the synthesis prediction mode, it is possible to more suitably determine the weighting of the intra prediction image in the synthesis of the intra prediction image and the inter prediction image.

Also in the present embodiment, in addition to the example, an encoded stream defined by subdividing each encoding mode while using a size of the block used in the encoding mode or the like as a parameter may be set as a decoding-target stream.

As described above, the decoding processing according to the embodiment of the present application is performed.

Furthermore, the image decoding apparatus and the image decoding method according to the second embodiment are applicable to a reproduction device, a mobile phone, a digital camera, or the like using them.

According to the image decoding apparatus and the image decoding method according to the second embodiment of the present invention described above, the encoded data having the small code amount can be decoded with higher image quality.

That is, according to the image decoding apparatus and the image decoding method according to the second embodiment of the present invention, a more suitable image decoding technique can be provided.

Third Embodiment

Next, FIG. 5 illustrates an example of a data recording medium according to a third embodiment of the present invention.

An encoded stream according to the present embodiment of the present invention is an encoded stream generated by the image encoding apparatus or the image encoding method according to the first embodiment. Since the generation method is as described in the first embodiment, the description thereof will be omitted.

Here, the encoded stream according to the present embodiment is recorded as, for example, a data string 502 on a data recording medium 501. The data string 502 is recorded as, for example, an encoded stream in accordance with a predetermined grammar.

First, the encoded stream is extracted as a bit string that is partitioned in a unit of a constant size called a network abstraction layer (NAL) unit 503. The bit string of the NAL unit is read out in accordance with a certain rule such as a variable length code, and is transformed as a raw byte sequence payload (RBSP). The RBSP data includes slice data 506 and information such as a sequence parameter set 504, a picture parameter set 505, a decoding parameter set, and a video parameter set.

For example, information 507 regarding each block is included in each slice. For example, a domain for recoding the encoding mode for each block exists in the information regarding the block, and this is set as an encoding mode flag 508.

According to the data recording medium according to the third embodiment of the present invention described above, the code amount can be reduced, and the deterioration of the image quality can be prevented. That is, it is possible to achieve a data recording medium that records an encoded stream having a high compression rate and a better image quality.

According to the data recording medium of the third embodiment of the present invention described above, the code amount can be reduced, and the deterioration of the image quality can be prevented. That is, the present invention can achieve the data recording medium recording an encoded stream having a high compression rate and a better image quality.

Note that the encoded stream generated by the image encoding apparatus or the image encoding method of each embodiment explained below can be also recorded in the data recording medium according to the present embodiments because of the above-described configuration of the present embodiments.

Fourth Embodiment

Next, a fourth embodiment of the present invention will be explained with reference to drawings.

In the fourth embodiment of the present invention, the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the first embodiment is changed.

Specifically, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 8 to a processing of determining the weighting parameter “w” illustrated in FIG. 9 . The image encoding apparatus and the image encoding method according to the fourth embodiment are the same as the image encoding apparatus and the image encoding method according to the first embodiment in terms of all configurations, operations and processing except for the processing of determining the weighting parameter “w” illustrated in FIG. 9 Therefore, the repetitive explanation for the same terms in the image encoding apparatus and the image encoding method according to the first embodiment is omitted.

FIG. 9 illustrates an example of the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the fourth embodiment. Since the similar processing of determining the weighting parameter “w” is also performed on the decoding side, the prediction-target block will be explained while being expressed as “encoding-(decoding-) target block”.

In the processing of determining the weighting parameter “w” in the example of FIG. 9 , as different from the example of FIG. 8 , not only the intra prediction mode of the encoding-(decoding-) target block but also a combination with prediction modes of a plurality of adjacent blocks are considered. Here, as an example of the plurality of adjacent blocks in the present embodiment, a combination of prediction modes of two adjacent blocks that are a block adjacently immediately above the encoding-(decoding-) target block and a block adjacently immediately on the left of the encoding-(decoding-) target block is considered.

In other words, in the example of FIG. 8 , the weighting parameter “w” is determined in accordance with only the intra prediction mode of the encoding-(decoding-) target block. On the other hand, in the example of FIG. 9 , even if the intra prediction mode of the encoding-(decoding-) target block is the same, the weighting parameter “w” is changed if the combination of the prediction modes of the plurality of adjacent blocks is different.

In the first embodiment, the difference of the approximation regarding the prediction method of the adjacent block due to the type of the intra prediction mode of the encoding-(decoding-) target block has been already explained. Specifically, the explanation has been made for the feature of the approximation regarding the planar prediction method of the adjacent block, in the cases of the planar prediction, the angular prediction while the prediction direction is 18 or 50, the angular prediction while the prediction direction is 2 to 17 or 51 to 66, the angular prediction while the prediction direction is 2 to 17 or 51 to 66, the angular prediction while the prediction direction is 19 to 49, and the DC prediction.

In FIG. 9 , the weighting parameter “w” is determined in accordance with the combination of the prediction modes of the plurality of adjacent blocks for each feature of the these intra prediction mode types.

Conditions (1) to (6) are considered as specific conditions for the combination of the prediction modes of the plurality of adjacent blocks, the condition (1) being a case where both two adjacent blocks that are the block that is adjacently immediately above the encoding-(decoding-) target block and the block that is adjacently immediately on the left of the encoding-(decoding-) target block are unavailable, the condition (2) being a case where either one of the two adjacent blocks that are the block that is adjacently immediately above the encoding-(decoding-) target block and the block that is adjacently immediately on the left of the encoding-(decoding-) target block is unavailable while the other is in the inter prediction, the condition (3) being a case where both the two adjacent blocks that are the block that is adjacently immediately above the encoding-(decoding-) target block and the block that is adjacently immediately on the left of the encoding-(decoding-) target block are in the inter prediction, the condition (4) being a case where either one of the two adjacent blocks that are the block that is adjacently immediately above the encoding-(decoding-) target block and the block that is adjacently immediately on the left of the encoding-(decoding-) target block is unavailable while the other is in the intra prediction, the condition (5) being a case where either one of the two adjacent blocks that are the block that is adjacently immediately above the encoding-(decoding-) target block and the block that is adjacently immediately on the left of the encoding-(decoding-) target block is in the inter prediction while the other is in the intra prediction, and the condition (6) being a case where both the two adjacent blocks that are the block that is adjacently immediately above the encoding-(decoding-) target block and the block that is adjacently immediately on the left of the encoding-(decoding-) target block are in the intra prediction.

Specifically, for each of the conditions (1) to (6) described above, the weighting parameter is determined as follows:

First, if the intra prediction mode of the encoding-(decoding-) target block is the planar prediction, the weighting parameter “w” is determined as illustrated in FIG. 9 . Specifically, “w=1” is determined under the conditions (1) to (3), and “w=2” is determined under the conditions (4) to (6). As explained in the first embodiment, the planar prediction is the intra prediction having the relatively low approximation regarding the prediction method of the adjacent block.

However, if the available intra prediction block exists as the adjacent block, there is a possibility of the planar prediction as similar to the encoding-(decoding-) target block, and therefore, the approximation to the adjacent block regarding the prediction method is slightly but still improved. Therefore, under the conditions (4) to (6), the weighting is preferably made larger than those of the conditions (1) to (3). As a modification example, “w=1” may be determined under the conditions (1) to (5), and “w=2” may be determined under only the condition (6). Since the upper adjacent pixel and the left adjacent pixel with respect to the target block are used in the processing of the planar prediction, this modification example is a modification example using a concept in which the approximation regarding the prediction method is improved only when both the prediction modes of the plurality of adjacent blocks are in the intra prediction.

Next, if the intra prediction mode of the encoding-(decoding-) target block is the angular prediction while the prediction direction is 18 or 50, the weighting parameter “w” may be determined as illustrated in FIG. 9 . Specifically, “w=1” is determined under the conditions (1) to (3), and “w=2” is determined under the conditions (4) to (6). If the intra prediction mode is the angular prediction while the prediction direction is 18 or 50, the prediction is the intra prediction having the approximation to either one of the adjacent blocks in the horizontal or vertical direction regarding the prediction method.

Therefore, under the conditions (4) to (6) where the available intra prediction block exists, the weighting is preferably made larger than those of the conditions (1) to (3). However, the effect of the approximation to the adjacent block regarding the prediction method is limited to either one of the horizontal or vertical direction. Therefore, even under the condition (6) where both the plurality of adjacent blocks are in the available intra prediction, the effect of the approximation to the adjacent block regarding the prediction method is not different from those of the conditions (4) and (5) where only either one of the plurality of adjacent blocks is in the available intra prediction. Thus, in the example of this drawing, “w=2” is determined even under the condition (6).

Next, if the intra prediction mode of the encoding-(decoding-) target block is the angular prediction while the prediction direction is 2 to 17 or 51 to 66 and the angular prediction while the prediction direction is 2 to 17 or 51 to 66, the weighting parameter “w” may be determined as illustrated in FIG. 9 . Specifically, “w=1” is determined under the conditions (1) to (3), “w=2” is determined under the conditions (4) and (5), and “w=3” is determined under the condition (6). If the intra prediction mode is the angular prediction while the prediction direction is 2 to 17 or 51 to 66 and the angular prediction while the prediction direction is 2 to 17 or 51 to 66, the prediction direction is an oblique direction, and therefore, the prediction is the intra prediction having the approximation to both the upper adjacent block and the left adjacent block regarding the prediction method. Therefore, the more the intra prediction blocks that are available as the adjacent block are, the higher the approximation to the adjacent block regarding the prediction method tends to be. Therefore, the more the intra prediction blocks that are available as the adjacent block are as described above, the larger the preferably-set weighting parameter “w” is.

Next, if the intra prediction mode of the encoding-(decoding-) target block is the DC prediction, the weighting parameter “w” may be determined as illustrated in FIG. 9 . Specifically, “w=2” is determined under the conditions (1) to (3), and “w=3” is determined under the conditions (4) to (6). As explained in the first embodiment, if the DC prediction is selected in the processing on the encoding side, the encoding-target image is highly possibly the planar pattern having the widely-continuing constant luminance. This possibility is particularly high when the adjacent block includes the available intra prediction block, and therefore, “w=3” is preferable. However, in the example of the present drawing, if the adjacent block does not include the available intra prediction block, the possibility of the encoding-target block to be the planar pattern having the widely-continuing constant luminance is slightly reduced, and therefore, “w=2” is determined.

By the processing of determining the weighting parameter “w” in FIG. 9 explained above, the weighting parameter “w” can be preferably determined in the determination of the weighting parameter “w” in the Expression 1 in the synthesis prediction processing because of the consideration of not only the intra prediction mode of the encoding-(decoding-) target block but also the combination of the prediction modes of the plurality of adjacent blocks.

Also, when the combination of the prediction modes of the plurality of adjacent blocks is set as a condition, the preferable condition can be set without the transmission of the new flag.

In the example of FIG. 9 , even if the prediction mode of the encoding-(decoding-) target block is any prediction mode, the weighting “w” under the condition (6) is made larger than that under the condition (1). This is because, even if the prediction mode of the encoding-(decoding-) target block is any prediction mode, the increase in the adjacent block serving as the available intra prediction block tends to cause not small increase in the approximation to the adjacent block regarding the prediction method.

And, in the example of FIG. 9 , if neither the planar prediction nor the DC prediction is assigned to the intra prediction used for the synthesis prediction, the weighting “w” is made larger in the case with the plurality of adjacent blocks including the available intra prediction block than the case without the plurality of adjacent blocks including the available intra prediction block.

As a modification example of FIG. 9 , “w=2” may be determined under the conditions (4) and (5) of the DC prediction as illustrated in FIG. 10 . In the example of FIG. 10 , “w=3” in the DC prediction is determined only under the condition (6). This is an example in which the encoding-target image is highly possibly the planar pattern having the widely-continuing constant luminance only under the condition (6) where both the plurality of adjacent blocks are in the available intra prediction. The example of FIG. 10 is the same as FIG. 9 except for the DC prediction under the conditions (4) and (5), and therefore, the repetitive explanation is omitted.

By the image encoding apparatus and the image encoding method according to the fourth embodiment of the present invention, the image can be more preferably encoded.

Fifth Embodiment

Next, a fifth embodiment of the present invention will be explained.

In the fifth embodiment of the present invention, the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image decoding apparatus and the image decoding method according to the second embodiment is changed.

Specifically, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 8 to a processing of determining the weighting parameter “w” illustrated in FIG. 9 or 10. The image decoding apparatus and the image decoding method according to the fifth embodiment use the processing of determining the weighting parameter “w” illustrated in FIG. 9 or 10 , but are the same as the image decoding apparatus and the image decoding method according to the second embodiment in terms of all configurations, operations and processing except for the processing of determining the weighting parameter “w” illustrated in FIG. 9 or 10 . Therefore, the repetitive explanation for the same terms in the image decoding apparatus and the image decoding method according to the second embodiment is omitted.

Also, the details of the processing of determining the weighting parameter “w” in FIG. 9 or 10 are as explained in the fourth embodiment, and therefore, the repetitive explanation is omitted.

Regarding the determination of the weighting parameter “w” of the Expression 1 in the synthesis prediction processing as illustrated in FIG. 9 or 10 in the image decoding apparatus and the image decoding method according to the fifth embodiment of the present invention as explained above, the weighting parameter “w” can be preferably determined because of the consideration of not only the intra prediction mode of the encoding-(decoding-) target block but also the combination of the prediction modes of the plurality of adjacent blocks.

By the image decoding apparatus and the image decoding method according to the fifth embodiment of the present invention, the image can be more preferably decoded.

Sixth Embodiment

Next, a sixth embodiment of the present invention will be explained with reference to drawings.

In the sixth embodiment of the present invention, a new flag for assigning the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing is set in the image encoding apparatus and the image encoding method according to the first or fourth embodiment, and the setting for this flag and the determination of the prediction mode using this flag are controlled.

In the image encoding apparatus and the image encoding method according to the first or fourth embodiment, the merge mode has been exemplified and explained as the example of the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing. Also, it has been also explained that the usage of the inter prediction that is the different prediction mode from the merge mode is also applicable as the example of the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing.

On the other hand, in the sixth embodiment of the present invention, a more specific processing of the method of determining the prediction mode is suggested.

Specifically, an inter-prediction assigning flag of the synthesis prediction mode illustrated in FIG. 11 is set, and this flag is set on the encoding side. This flag is used on the decoding side to control the determination of the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing.

The image encoding apparatus and the image encoding method according to the sixth embodiment are the same as the image encoding apparatus and the image encoding method according to the first or fourth embodiment in terms of all configurations, operations and processing except for the processing relating to the inter-prediction assigning flag of the synthesis prediction mode illustrated in FIG. 11 . Therefore, the repetitive explanation for the same terms in the image encoding apparatus and the image encoding method according to the first or fourth embodiment is omitted.

FIG. 11 illustrates an example of the control of the setting for the inter-prediction assigning flag of the synthesis prediction mode and the control of the determination of the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the sixth embodiment of the present invention.

In the example of FIG. 11 , information of 1 bit is set as the inter-prediction assigning flag of the synthesis prediction mode. On the encoding side, three types of processing that are (1) no transmission of 1 bit of the inter-prediction assigning flag of the synthesis prediction mode, (2) transmission of the 1 bit set as 0, and (3) transmission of the 1 bit set as 1 can be executed.

On the other hand, if (1) the 1 bit of the inter-prediction assigning flag of the synthesis prediction mode is not transmitted from the encoding side, it is determined on the decoding side that the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing is the merge mode. As a result, even if the information of 1 bit is not added, the merge mode can be assigned. Since the merge mode is the prediction mode having the high approximation to the adjacent block regarding the prediction method, the merge mode can be often the preferable option.

On the other hand, if (2) the 1 bit of the inter-prediction assigning flag of the synthesis prediction mode is set as 0 and is transmitted from the encoding side, and if the adjacent block that is on the immediately left side of the decoding-target block is available and in the inter prediction, the decoding side selects the inter prediction mode that is the same as that of the immediately-left adjacent block as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing. And, if the adjacent block that is on the immediately left side of the decoding-target block does not satisfy this condition, the decoding side selects the merge mode as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing.

As a result, for the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing, the prediction mode of the adjacent block that is on the immediately left side of the decoding-target block can be selected as the different prediction mode from the merge mode. This case is preferable when the encoding efficiency is higher in the usage of the prediction mode of the adjacent block that is on the immediately left side of the decoding-target block than the merge mode.

Alternatively, if (3) the 1 bit of the inter-prediction assigning flag of the synthesis prediction mode is set as 1 and is transmitted from the encoding side, and if the adjacent block that is immediately above the decoding-target block is available and in the inter prediction, the decoding side selects the inter prediction mode that is the same as that of the immediately-above adjacent block as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing.

And, if the adjacent block that is immediately above the decoding-target block does not satisfy this condition, the decoding side selects the merge mode as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing. As a result, as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing, the prediction mode of the adjacent block that is immediately above the decoding-target block can be selected as the different prediction mode from the merge mode. This case is preferable when the encoding efficiency is higher in the usage of the prediction mode of the adjacent block that is immediately above the decoding-target block than the merge mode.

By the control of the setting for the inter-prediction assigning flag of the synthesis prediction mode and the control of the determination of the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing as explained above in FIG. 11 , the merge mode and the prediction mode different from the merge mode can be more preferably set and determined as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing.

Particularly, only by the flag setting of 1 bit, the prediction mode different from the merge mode can be employed as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing, and therefore, this case is preferable. The merge mode having the high approximation to the adjacent block regarding the prediction method can be set and determined without the transmission of the special (or dedicated) flag for assigning the inter prediction in the synthesis prediction mode, and therefore, this case is preferable for suppressing the increase in the transmitted information.

By the image encoding apparatus and the image encoding method according to the sixth embodiment of the present invention, the image can be more preferably encoded.

Seventh Embodiment

Next, a seventh embodiment of the present invention will be explained with reference to drawings.

In the seventh embodiment of the present invention, a new flag for assigning the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing is set in the image decoding apparatus and the image decoding method according to the second or fifth embodiment, and the setting for this flag and the determination of the prediction mode using this flag are controlled.

Specifically, the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing is determined by a method illustrated in FIG. 11 . The image decoding apparatus and the image decoding method are the same as the image decoding apparatus and the image decoding method according to the second or fifth embodiment in terms of all configurations, operations and processing except for the processing of determining the prediction mode using the flag for assigning the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing illustrated in FIG. 11 . Therefore, the repetitive explanation for the same terms in the image decoding apparatus and the image decoding method according to the second or fifth embodiment is omitted.

Also, the details of the processing of determining the prediction mode using the flag for assigning the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing illustrated in FIG. 11 are as explained in the sixth embodiment, and therefore, the repetitive explanation is omitted.

In the image decoding apparatus and the image decoding method according to the seventh embodiment of the present invention as explained above, the merge mode and the prediction mode different from the merge mode can be more preferably set and determined as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing. Particularly, only by the flag setting of 1 bit, the prediction mode different from the merge mode can be employed as the prediction mode of the prediction image synthesized with the intra prediction image in the synthesis prediction processing, and therefore, this case is preferable. The merge mode having the high approximation to the adjacent block regarding the prediction method can be determined without the transmission of the special (or dedicated) flag for assigning the inter prediction in the synthesis prediction mode, and this case is preferable for suppressing the increase in the transmitted information from the encoding side.

By the image decoding apparatus and the image decoding method according to the seventh embodiment of the present invention, the image can be more preferably decoded.

Eighth Embodiment

Next, an eighth embodiment of the present invention will be explained with reference to drawings.

In the eighth embodiment of the present invention, a prediction image based on matrix weighting intra prediction is handled as the intra prediction image used for the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the first embodiment. Note that the matrix weighting intra prediction in the present embodiment is an example of the prediction processing explained as the “matrix prediction” in the first embodiment.

Specifically, the matrix weighting intra prediction explained in FIG. 12 is used for the intra prediction image in the synthesis prediction processing. Further, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 8 to a processing of determining the weighting parameter “w” illustrated in FIG. 13 . The image encoding apparatus and the image encoding method according to the eighth embodiment are the same as the image encoding apparatus and the image encoding method according to the first embodiment in terms of all configurations, operations and processing except for the matrix weighting intra prediction explained in FIG. 12 and the processing of determining the weighting parameter “w” illustrated in FIG. 13 . Therefore, the repetitive explanation for the same terms in the image encoding apparatus and the image encoding method according to the first embodiment is omitted.

First, the matrix weighting intra prediction will be explained with reference to FIG. 12 . Since the similar matrix weighting intra prediction is also performed on the decoding side, the prediction-target block will be explained while being expressed as “encoding-(decoding-) target block”. The matrix weighting intra prediction is the pixel prediction based on a vector calculation of a boarder pixel of the block adjacent to the encoding-(decoding-) target block and a matrix assigned by the mode. In the processing of the matrix weighting intra prediction, the prediction image is generated through (1) down sampling processing, (2) vector calculation (weighting matrix calculation) processing and (3) up sampling processing after a processing of preparing the boarder pixel.

First, in the processing of preparing the boarder pixel, border pixels on one line from an adjacent block that is immediately on a left side of the encoding-(decoding-) target block are acquired and set as an immediately-left boarder pixel row. Also, border pixels on one line from an adjacent block that is immediately above it are acquired and set as an immediately-above boarder pixel row. Here, if the boarder pixels are unavailable, the same method as that of the existing intra prediction is performed. If the immediately-left and the immediately-above boarder pixels include no decoding pixel, a center value is set to “1<<(Bitdepth−1)”. The pixels are scanned upward and rightward in an order of the upward direction and the right ward direction from a down left pixel, and the first existing pixel is copied on the down left pixel. The pixels are scanned again upward from the down left pixel, and, if the pixel does not exist, a pixel below it is copied. Similarly, the pixels are scanned rightward from an up left pixel, and, if the pixel does not exist, a pixel on a left side of it is copied.

Next, the (1) down sampling processing take an average of each two pixels in the immediately-left boarder pixel row and the immediately-above boarder pixel row to generate a reduced immediately-left boarder pixel row and a reduced immediately-above boarder pixel row.

Next, the (2) vector calculation (weighting matrix calculation) synthesizes the reduced immediately-left boarder pixel row and the reduced immediately-above boarder pixel row in accordance with a size of the encoding-(decoding-) target block and a method determined by the assigned mode to generate a reduced boarder vector. Next, the vector calculation based on the matrix assigned by the matrix weighting intra prediction mode is performed to the above-described reduced boarder vector to generate a reduced prediction vector. A prediction pixel at a sub sample position of the original decoding-target block is generated by the reduced prediction vector.

Next, in the (3) up sampling processing, linear interpolation is performed to the boarder pixel row, the reduced boarder pixel row and the prediction pixel at the sub sample position to generate the entire prediction pixel of the encoding-(decoding-) target block.

Next, FIG. 13 illustrates an example of the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the eighth embodiment. Since the similar processing of determining the weighting parameter “w” is also performed on the decoding side, the prediction-target block will be explained while being expressed as “encoding-(decoding-) target block”.

In the processing of determining the weighting parameter “w” in the synthesis prediction processing in FIG. 13 , the processing of determining the weighting parameter “w” in the case in which the intra prediction used for the synthesis prediction processing is the matrix weighting intra prediction is added to the processing of determining the weighting parameter “w” in FIG. 8 . Specifically, the rightmost column of the table of FIG. 13 is added. Here, in the matrix weighting intra prediction, the prediction image varies depending on the weighting matrix assigned by the flag to the encoding-(decoding-) target block in the matrix weighting intra prediction. The flag is assigned on the encoding side, and is transmitted to the decoding side. In this manner, the weighting matrix assigned on the encoding side can be also recognized on the decoding side. Therefore, the matrix weighting intra prediction is the intra prediction having not the high approximation at all to the adjacent block regarding the prediction method. However, since both the boarder pixel row of the immediately-above adjacent block and the boarder pixel row of the immediately-left adjacent block are used, the approximation between the prediction image of the matrix weighting intra prediction and the prediction image of the adjacent block is relatively high. Also, the matrix weighting intra prediction can increase the prediction accuracy in accordance with the image, depending on the weighting matrix assigned by the flag, and therefore, is different in the tendency from the planar prediction that is difficult to increase the prediction accuracy. Therefore, if the matrix weighting intra prediction is used as the intra prediction used for the synthesis prediction, “w=3” may be determined as the weighting parameter “w” as illustrated in FIG. 13 . In other words, the larger “w” value than the “w” value of the planar prediction may be selected.

By the example of the determination of the “w” in the synthesis prediction mode in FIG. 13 as explained above, the weighting of the intra prediction image in the synthesis of the intra prediction image and the inter prediction image can be preferably determined even if the matrix weighting intra prediction is used as the option for the types of the intra prediction used for the synthesis prediction mode.

By the image encoding apparatus and the image encoding method according to the eighth embodiment as described above, the more preferable synthesis prediction mode can be achieved, and the image can be more preferably encoded.

Ninth Embodiment

Next, a ninth embodiment of the present invention will be explained.

In the ninth embodiment of the present invention, the prediction image based on the matrix weighting intra prediction is handled as the intra prediction image used for the synthesis prediction processing in the image decoding apparatus and the image decoding method according to the second embodiment. Note that the matrix weighting intra prediction in the present embodiment is an example of the prediction processing explained as the “matrix prediction” in the second embodiment. The details of the processing of the matrix weighting intra prediction are as explained in the eighth embodiment, and therefore, the repetitive explanation is omitted.

Specifically, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 8 to the processing of determining the weighting parameter “w” illustrated in FIG. 13 . The image decoding apparatus and the image decoding method according to the ninth embodiment uses the processing of determining the weighting parameter “w” illustrated in FIG. 13 , but are the same as the image decoding apparatus and the image decoding method according to the second embodiment in terms of all configurations, operations and processing except for the processing of determining the weighting parameter “w” illustrated in FIG. 13 . Therefore, the repetitive explanation for the same terms in the image decoding apparatus and the image decoding method according to the second embodiment is omitted.

The details of the processing of the processing of determining the weighting parameter “w” illustrated in FIG. 13 are as explained in the eighth embodiment, and therefore, the repetitive explanation is omitted.

By the image decoding apparatus and the image decoding method according to the ninth embodiment of the present invention as described above, the weighting of the intra prediction image in the synthesis of the intra prediction image and the inter prediction image can be preferably determined even if the matrix weighting intra prediction is used as the option for the types of the intra prediction used for the synthesis prediction mode as illustrated in FIG. 13 .

By the image decoding apparatus and the image decoding method according to the ninth embodiment of the present invention as explained above, the more preferable synthesis prediction mode can be achieved, and the image can be more preferably decoded.

Tenth Embodiment

Next, a tenth embodiment of the present invention will be explained with reference to the drawings.

In the tenth embodiment of the present invention, the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the fourth embodiment of the present invention is changed in order to use the matrix weighting intra prediction for the intra prediction image of the synthesis prediction processing. Here, the details of the processing of the matrix weighting intra prediction are as explained in the eighth embodiment, and therefore, the repetitive explanation is omitted.

Specifically, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 10 to the processing of determining the weighting parameter “w” illustrated in FIG. 14 . In a table of the processing of determining the weighting parameter “w” illustrated in FIG. 14 , a column for the matrix weighting intra prediction is provided on the rightmost column of the table in addition to the processing of determining the weighting parameter “w” illustrated in FIG. 10 . The image encoding apparatus and the image encoding method according to the tenth embodiment are the same as the image encoding apparatus and the image encoding method according to the fourth embodiment in terms of all configurations, operations and processing except for the processing of determining the weighting parameter “w” illustrated in FIG. 14 . Therefore, the repetitive explanation for the same terms in the image encoding apparatus and the image encoding method according to the fourth embodiment is omitted.

In the processing of the determining the weighting parameter “w” illustrated in FIG. 14 , specifically, “w=1” is determined under the conditions (1), (2) and (4), and “w=3” is determined under the conditions (3), (5) and (6). In the matrix weighting intra prediction, both the boarder pixel row of the immediately-above adjacent block and the boarder pixel row of the immediately-left adjacent block are used for the generation of the prediction image as explained in the eighth embodiment. Therefore, if both the immediately-above adjacent block and the immediately-left adjacent block are available, the approximation between the prediction image of the matrix weighting intra prediction and the prediction image of the adjacent block is high. Therefore, “w=3” is determined under the conditions (3), (5) and (6) where both the immediately-above adjacent block and the immediately-left adjacent block are available. On the other hand, under the conditions (1), (2) and (4), at least one block of the immediately-above adjacent block and the immediately-left adjacent block is unavailable, and therefore, the weighting parameter is determined to be “w=1”. As a result, the weighting parameter “w” can be increased only when it is estimated that the approximation between the prediction image of the matrix weighting intra prediction and the prediction image of the adjacent block is high, and this case is more preferable.

In the example of FIG. 14 , even if the prediction mode of the encoding-(decoding-) target block is any prediction mode, the weighting “w” under the condition (6) is made larger than that under the condition (1). This is because, even if the prediction mode of the encoding-(decoding-) target block is any prediction mode, the increase in the intra prediction block that is available as the adjacent block tends to cause not small increase in the approximation to the adjacent block regarding the prediction method.

And, in the example of FIG. 14 , if neither the planar prediction nor the DC prediction is assigned to the intra prediction for the synthesis prediction, the weighting “w” is made larger in the case with the plurality of adjacent blocks including the available intra prediction block than the case without the plurality of adjacent blocks including the available intra prediction block.

As a modification example of FIG. 14 , “w=2” may be determined under the conditions (2) and (4) as the weighting of the matrix weighting intra prediction in the synthesis prediction as illustrated in FIG. 15 . In the example of FIG. 14 , the weighting parameter “w” is determined to be “w=1” under the conditions (1), (2) and (4). However, the condition (1) is the condition where both the immediately-above adjacent block and the immediately-left adjacent block are unavailable, and the conditions (2) and (4) are the conditions where at least either one block of the immediately-above adjacent block and the immediately-left adjacent block is unavailable, and therefore, the circumstances are different from each other. Under the conditions (2) and (4), the other block of the immediately-above adjacent block and the immediately-left adjacent block is available, and therefore, the prediction accuracy should be higher than that of the condition (1). Therefore, each weighting parameter under the conditions (2) and (4) is more preferable to be larger than that of the condition (1).

The example of FIG. 15 is the same as FIG. 14 except for the conditions (2) and (4) of the matrix weighting intra prediction, and therefore, the repetitive explanation is omitted.

In other words, by the image encoding apparatus and the image encoding method according to the tenth embodiment of the present invention, the weighting parameter can be more preferably determined even if the matrix weighting intra prediction is used for the intra prediction image of the synthesis prediction processing.

By the image encoding apparatus and the image encoding method according to the tenth embodiment of the present invention as explained above, the image can be more preferably encoded.

Eleventh Embodiment

Next, an eleventh embodiment of the present invention will be explained.

In the eleventh embodiment of the present invention, the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image decoding apparatus and the image decoding method according to the fifth embodiment of the present invention is changed in order to use the matrix weighting intra prediction for the intra prediction image of the synthesis prediction processing. Here, the details of the processing of the matrix weighting intra prediction are as explained in the eighth embodiment, and therefore, the repetitive explanation is omitted.

Specifically, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 10 to a processing of determining the weighting parameter “w” illustrated in FIG. 14 or 15 . In a table of the processing of determining the weighting parameter “w” illustrated in FIG. 14 or 15 , a column for the matrix weighting intra prediction is provided on the rightmost column of the table in addition to the processing of determining the weighting parameter “w” illustrated in FIG. 10 . The image decoding apparatus and the image decoding method according to the eleventh embodiment use the processing of determining the weighting parameter “w” illustrated in FIG. 14 or 15 , but are the same as the image decoding apparatus and the image decoding method according to the fifth embodiment in terms of all configurations, operations and processing except for the processing of determining the weighting parameter “w” illustrated in FIG. 14 or 15 . Therefore, the repetitive explanation for the same terms in the image decoding apparatus and the image decoding method according to the fifth embodiment is omitted.

The details of the processing of determining the weighting parameter “w” illustrated in FIG. 14 or 15 are as explained in the tenth embodiment, and therefore, the repetitive explanation is omitted.

In other words, by the image decoding apparatus and the image decoding method according to the eleventh embodiment of the present invention, the weighting parameter can be more preferably determined even if the matrix weighting intra prediction is used for the intra prediction image of the synthesis prediction processing.

By the image decoding apparatus and the image decoding method according to the eleventh embodiment of the present invention as explained above, the image can be more preferably decoded.

Twelfth Embodiment

Next, a twelfth embodiment of the present invention will be explained with reference to the drawings.

In the twelfth embodiment of the present invention, a prediction image based on the in-screen block copy prediction is handled as the intra prediction image used for the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the first embodiment. Note that the in-screen block copy prediction in the present embodiment is an example of the prediction processing explained as the “in-screen block copy” in the first embodiment.

Specifically, the prediction image based on the in-screen block copy prediction explained in FIG. 16 is used for the intra prediction image in the synthesis prediction processing. Further, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 8 to a processing of determining the weighting parameter “w” illustrated in FIG. 17 . The image encoding apparatus and the image encoding method according to the twelfth embodiment are the same as the image encoding apparatus and the image encoding method according to the first embodiment in terms of all configurations, operations and processing except for the in-screen block copy explained in FIG. 16 and the processing of determining the weighting parameter “w” illustrated in FIG. 17 . Therefore, the repetitive explanation for the same terms in the image encoding apparatus and the image encoding method according to the first embodiment is omitted.

First, the in-screen block copy prediction will be explained with reference to FIG. 16 .

FIG. 16(A) is a diagram for explaining the processing of the in-screen block copy prediction. Since the in-screen block copy prediction is performed both on the encoding side and the decoding side, FIG. 16(A) will be similarly used for the explanation. Therefore, an encoding-target image 1600 and a decoding-target image 1600 are separately expressed on the encoding side and the decoding side, respectively, although the same reference sign is used. And, an encoding-target block 1610 and a decoding-target block 1610 are also separately expressed on the encoding side and the decoding side, respectively.

First, a block having small difference from the encoding-target block 1610 of the encoding-target image 1600 is searched in the same encoding-target image 1600 (the temporally same image). A search range may be limited to an appropriate range. By this search, a similar block 1620 having the smallest difference is determined. A vector that indicates the similar block 1620 from the encoding-target block 1610 is calculated as a block vector. The similar block 1620 is set as the prediction image based on the in-screen block copy prediction in the encoding-target block 1610. The prediction processing using this prediction image is performed for the encoding. The block vector is transmitted from the encoding side to the decoding side.

On the decoding side, a similar block 1620 in the decoding-target block 1610 is identified by the block vector transmitted from the encoding side. The similar block 1620 is a block indicated by the block vector, in the decoding-target image 1600 that is temporally the same as the decoding-target block 1610. Such an identified similar block 1620 is used as the prediction image of the in-screen block copy prediction in the decoding-target block 1610. As a result, the decoding processing using the in-screen block copy prediction can be also achieved on the decoding side.

An effective example of the in-screen block copy prediction explained above will be explained with reference to FIGS. 16(B) and (C).

FIG. 16(B) illustrates an example of the encoding-/decoding-target block and the similar block. For example, if the same letter exists in the same images, one of which is included in the encoding-/decoding-target block, the indication by the block vector to a position including the same letter increases the prediction accuracy.

FIG. 16(C) illustrates an example of the encoding-/decoding-target block and the similar block. For example, if the same pictogram (emoji) or figure exists in the same images, one of which is included in the encoding-/decoding-target block, the indication by the block vector to a position including the same pictogram (emoji) or figure increases the prediction accuracy.

The processing of the in-screen block copy prediction is as described above. In the in-screen block copy prediction, the information of the prediction method and the prediction pixel of the adjacent block is not used, and therefore, the approximation regarding the prediction method to the different intra prediction (angular prediction or others) of the adjacent block is not particularly high. However, a prerequisite in the in-screen block copy prediction is to identify the similar block having the high prediction accuracy by the search processing on the encoding side to advance the processing. Therefore, this is a prediction processing having a higher prediction accuracy than those of the different intra predictions.

Next, FIG. 17 illustrates an example of the processing of determining the weighting parameter “w” in the synthesis prediction processing in the image encoding apparatus and the image encoding method according to the twelfth embodiment of the present invention. Since the similar processing of determining the weighting parameter “w” is also performed on the decoding side, the prediction-target block will be explained while being expressed as “encoding-(decoding-) target block”.

In the processing of determining the weighting parameter “w” in the synthesis prediction processing in FIG. 17 , the processing of determining the weighting parameter “w” in the case in which the intra prediction used for the synthesis prediction processing is the in-screen block copy prediction is added to the processing of determining the weighting parameter “w” in FIG. 8 . Specifically, the rightmost column is added in the table of FIG. 17 . Here, as described above, the in-screen block copy prediction is a prediction processing having a higher prediction accuracy than those of the different intra predictions.

Therefore, if the in-screen block copy prediction is used as the intra prediction used for the synthesis prediction, “w=3” may be determined as the weighting parameter “w” as illustrated in FIG. 17 . In this case, the value “w” of the in-screen block copy prediction is larger than the value “w” of the planar prediction.

By the example of the determination of the “w” in the synthesis prediction mode in FIG. 17 as explained above, the weighting of the intra prediction image in the synthesis of the intra prediction image and the inter prediction image can be preferably determined even if the in-screen block copy prediction is used as the option for the types of the intra prediction used for the synthesis prediction mode.

By the image encoding apparatus and the image encoding method according to the twelfth embodiment explained above, the more preferable synthesis prediction mode can be achieved, and the image can be more preferably encoded.

Thirteenth Embodiment

Next, a thirteenth embodiment of the present invention will be explained.

In the thirteenth embodiment of the present invention, the prediction image based on the in-screen block copy prediction is also handled as the intra prediction image used for the synthesis prediction processing in the image decoding apparatus and the image decoding method according to the second embodiment. The details of the processing of the in-screen block copy prediction are as explained in the twelfth embodiment, and therefore, the repetitive explanation is omitted.

Specifically, the processing of determining the weighting parameter “w” is changed from the processing of determining the weighting parameter “w” illustrated in FIG. 8 to the processing of determining the weighting parameter “w” illustrated in FIG. 17 . The image decoding apparatus and the image decoding method according to the thirteenth embodiment uses the processing of determining the weighting parameter “w” illustrated in FIG. 17 , but are the same as the image decoding apparatus and the image decoding method according to the second embodiment in terms of all configurations, operations and processing except for the processing of determining the weighting parameter “w” illustrated in FIG. 17 . Therefore, the repetitive explanation for the same terms in the image decoding apparatus and the image decoding method according to the second embodiment is omitted.

The details of the processing of the processing of determining the weighting parameter “w” illustrated in FIG. 17 are as explained in the twelfth embodiment, and therefore, the repetitive explanation is omitted.

By the image decoding apparatus and the image decoding method according to the thirteenth embodiment of the present invention as described above, the weighting of the intra prediction image in the synthesis of the intra prediction image and the inter prediction image can be preferably determined even if the in-screen block copy prediction is used as the option for the types of the intra prediction used for the synthesis prediction mode as illustrated in FIG. 17 .

By the image decoding apparatus and the image decoding method according to the thirteenth embodiment of the present invention as explained above, the more preferable synthesis prediction mode can be achieved, and the image can be more preferably decoded.

Any combination of the embodiments such as the drawings and the methods described above can be an embodiment of the present invention.

Each embodiment of the present invention described above can reduce an encoding amount, and prevent the deterioration of the image quality. In other words, the high compression rate and the high image quality can be achieved.

EXPLANATION OF REFERENCE CHARACTERS

101 . . . image input interface, 102 . . . block divider, 103 . . . mode controller, 104 . . . intra predictor, 105 . . . inter predictor, 106 . . . block processor, 107 . . . converter/quantizer, 108 . . . inverse quantizer/inverse converter, 109 . . . image synthesizer/filter, 110 . . . decoded image controller, 111 . . . entropy encoder, 112 . . . data output interface, 201 . . . stream analyzer, 202 . . . block controller, 203 . . . mode determiner, 204 . . . intra predictor, 205 . . . inter predictor, 206 . . . coefficient analyzer, 207 . . . inverse quantizer/inverse converter, 208 . . . image synthesizer/filter, 209 . . . decoded image controller, 210 . . . image output interface, 120 . . . synthesis predictor, 220 . . . synthesis predictor 

1. An image encoding method for encoding an image, comprising: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to an encoding-target block; and an encoding step of encoding a difference between the prediction image generated in the prediction image generation step and a pixel value of an image of the encoding-target block, wherein a plurality of types of intra predictions are allowed to be used as the intra prediction used for the synthesis processing, and the plurality of types of intra predictions include an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and a weighting parameter of the prediction image of the intra prediction in the weighting processing is determined in accordance with the type of the intra prediction.
 2. An image encoding method for encoding an image, comprising: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to an encoding-target block; and an encoding step of encoding a difference between the prediction image generated in the prediction image generation step and a pixel value of an image of the encoding-target block, wherein types of the intra prediction that can be used in the prediction image generation step include a planar prediction and an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and, in the weighting of the prediction image of the intra prediction, a processing state of the weighting processing includes a state of setting a smaller weighting for the planar prediction than a matrix weighting intra prediction among the types of the intra prediction.
 3. An image encoding method for encoding an image, comprising: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to an encoding-target block; and an encoding step of encoding a difference between the prediction image generated in the prediction image generation step and a pixel value of an image of the encoding-target block, wherein types of the intra prediction that can be used in the prediction image generation step include a planar prediction and an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and a processing state of the weighting processing includes a state of setting the smallest weighting for the prediction image of the intra prediction while the type of the intra prediction is the planar prediction.
 4. An image decoding method for decoding an encoded stream obtained by encoding an image, the image decoding method comprising: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to a decoding-target block; and a decoding image generation step of generating a decoding image based on the prediction image generated in the prediction image generation step and a difference image of the decoding-target block, wherein a plurality of types of intra predictions are allowed to be used as the intra prediction used for the synthesis processing, and the plurality of types of intra predictions include an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and a weighting parameter of the prediction image of the intra prediction in the weighting processing is determined in accordance with a type of the intra prediction.
 5. An image decoding method for decoding an encoded stream obtained by encoding an image, the image decoding method comprising: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to a decoding-target block; and a decoding image generation step of generating a decoding image based on the prediction image generated in the prediction image generation step and a difference image of the decoding-target block, wherein types of the intra prediction that can be used in the prediction image generation step include a planar prediction and an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and, in the weighting of the prediction image of the intra prediction, a processing state of the weighting processing includes a state of setting a smaller weighting for the planar prediction than the matrix weighting intra prediction among the types of the intra prediction.
 6. An image decoding method for decoding an encoded stream obtained by encoding an image, the image decoding method comprising: a prediction image generation step of generating a prediction image of a synthesis prediction by performing synthesis processing of synthesizing a prediction image of an inter prediction and a prediction image of an intra prediction to a decoding-target block; and a decoding image generation step of generating a decoding image based on the prediction image generated in the prediction image generation step and a difference image of the decoding-target block, wherein types of the intra prediction that can be used in the prediction image generation step include a planar prediction and an in-screen block copy prediction, the synthesis processing includes weighting processing performed to the prediction image of the inter prediction and the prediction image of the intra prediction, and a processing state of the weighting processing includes a state of setting the smallest weighting for the prediction image of the intra prediction while the type of the intra prediction is the planar prediction. 